Deavmi's coding shack
Commit 4f104ea5ebeb83e0201ca91abe676a955ac57a8c
Parents : 863266e
Author : Tristan B. Kildaire <deavmi@redxen.eu>
Date : 2021-05-31T18:47:37+02:00
WIP: Struct documentation
Changes
2 files changed, 36 insertions(+), 2 deletions(-)
Diff
diff --git a/new_docs/content/documentation/structs.md b/new_docs/content/documentation/structs.md
index 3ad5c4a..b975c26 100644
--- a/new_docs/content/documentation/structs.md
+++ b/new_docs/content/documentation/structs.md
@@ -37,6 +37,39 @@ struct Person
# Member functions
-TODO: Add this
+One can also define a struct to have certain functions associated with it that will operate on its data without having to refer to it directly in the source code. The syntac for a member function with return type `<returnType>`, name `<funcName>`, of a struct is (along with our previous struct) as follows:
-## Example
\ No newline at end of file
+```
+struct <name>
+{
+ <type1> <field1>;
+ <type2> <field2>;
+
+ <returnType> <funcName>()
+ {
+ return <instanceOfReturnType>;
+ }
+}
+```
+
+## Example
+
+TODO: Add some text here describing it
+
+```
+struct structTest
+{
+ int j;
+ int j;
+
+ void pdsjhfjdsf(int j)
+ {
+
+ }
+
+ void pdsjhfjdsf(int j)
+ {
+
+ }
+}
+```
\ No newline at end of file
diff --git a/new_docs/themes/hugo-classic b/new_docs/themes/hugo-classic
new file mode 160000
index 0000000..3ef6687
--- /dev/null
+++ b/new_docs/themes/hugo-classic
@@ -0,0 +1 @@
+Subproject commit 3ef6687317c1acce1cfc1d4c4503f4a6774781e6
Served by rngit 1.5.0 - Generated in 0.06s